from selenium import webdriver
from scrapy.selector import Selector
import time
browser = webdriver.Chrome(executable_path="D:/spider/chromedriver.exe")

# browser.get("https://dj.jd.com/search.html")
browser.get("https://passport.jd.com/new/login.aspx?ReturnUrl=https%3A%2F%2Fdj.jd.com%2Fsearch.html")

browser.find_element_by_css_selector(".login-tab-r").click()

browser.find_element_by_css_selector(".item-fore1 input[name='loginname']").send_keys("18200702230")
browser.find_element_by_css_selector(".item-fore2 input[name='nloginpwd']").send_keys("luo467021072")

browser.find_element_by_css_selector(".login-btn").click()

time.sleep(50)
print(browser.page_source)

# t_selector = Selector(text=browser.page_source)

# list = t_selector.css(".project-item  .project-info-box  .project-title a::text").extract()
# extract_first()
# print(list)

# browser.quit()